package com.hksj.gas.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hksj.gas.dto.GasDeviceDTO;
import com.hksj.gas.dto.GasDeviceDetailsDTO;
import com.hksj.gas.vo.GasDeviceTimeVO;
import com.hksj.gas.vo.GasDeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface GasDeviceMapper {

    List<GasDeviceVO> queryPressureGasDeviceListByPage(@Param("page")IPage<GasDeviceVO> page, @Param("dto") GasDeviceDTO dto);

    @DS("TAOS")
    List<GasDeviceVO> queryHistoryDeviceDaily(@Param("deviceIdList")List<String> deviceIdList, @Param("tableName") String tableName,@Param("dto") GasDeviceDTO dto);

    //查询设备压力趋势
    @DS("TAOS")
    List<GasDeviceTimeVO> queryPressureDeviceList(@Param("dto") GasDeviceDetailsDTO dto, @Param("tableName") String tableName);

    List<GasDeviceVO> queryFlowGasDeviceListByPage(@Param("page")IPage<GasDeviceVO> page, @Param("dto") GasDeviceDTO dto);

    @DS("TAOS")
    List<GasDeviceVO> queryFlowHistoryDeviceDaily(@Param("deviceIdList")List<String> deviceIdList, @Param("tableName") String tableName,@Param("dto") GasDeviceDTO dto);

    @DS("TAOS")
    List<GasDeviceTimeVO> queryFlowDeviceList(@Param("dto")GasDeviceDetailsDTO dto,@Param("tableName") String tableName);

    @DS("TAOS")
    Long queryPressureDeviceCount(@Param("dto") GasDeviceDetailsDTO dto, @Param("tableName") String tableName);

}
